package com.xcfw.dorm.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.Objects;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
    private Integer id;

    private Integer schoolId;

    private String name;

    private Long phone;

    private Long qq;

    private String weixin;

    private Integer sex;

    private String limits;

    private String icon;

    private String studentClass;

    private Short grade;

    private String profession;

    private String series;

    private String building;

    private Short dormitory;

    private Integer identity;

    private Integer judgeExamine;

    private String schoolPosition;

    private String assistant;

    private Long assistantPhone;

    private String parent;

    private Long parentPhone;

    private String password;

    private String uuid;

    private Date updateTime;

    private Date createTime;

    private Integer pageNum;

    private Integer pageSize;

    private Integer floor;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Student student = (Student) o;
        return Objects.equals(schoolId, student.schoolId) &&
                Objects.equals(name, student.name) &&
                Objects.equals(phone, student.phone) &&
                Objects.equals(qq, student.qq) &&
                Objects.equals(weixin, student.weixin) &&
                Objects.equals(sex, student.sex) &&
                Objects.equals(limits, student.limits) &&
                Objects.equals(icon, student.icon) &&
                Objects.equals(studentClass, student.studentClass) &&
                Objects.equals(grade, student.grade) &&
                Objects.equals(profession, student.profession) &&
                Objects.equals(series, student.series) &&
                Objects.equals(building, student.building) &&
                Objects.equals(dormitory, student.dormitory) &&
                Objects.equals(identity, student.identity) &&
                Objects.equals(schoolPosition, student.schoolPosition) &&
                Objects.equals(assistant, student.assistant) &&
                Objects.equals(assistantPhone, student.assistantPhone) &&
                Objects.equals(parent, student.parent) &&
                Objects.equals(parentPhone, student.parentPhone) &&
                Objects.equals(password, student.password);
    }

    @Override
    public int hashCode() {

        return Objects.hash(super.hashCode(), schoolId, name, phone, qq, weixin, sex, limits, icon, studentClass, grade, profession, series, building, dormitory, identity, schoolPosition, assistant, assistantPhone, parent, parentPhone, password);
    }
}